package com.zg.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zg.dao.TemplateMapper;
import com.zg.pojo.Template;
import com.zg.service.TemplateService;

@Service("templateService")
public class TemplateServiceImpl implements TemplateService {

	@Resource
	private TemplateMapper templateDao;
	
	@Override
	public Template getTemplateById(int id) {
		return this.templateDao.selectByPrimaryKey(id);
	}

	@Override
	public int insert(Template record) {
		return this.templateDao.insert(record);
	}

	@Override
	public int updateByParimaryKeySelective(Template record) {
		return this.templateDao.updateByPrimaryKeySelective(record);
	}

	@Override
	public int deleteByPrimaryKey(int id) {
		return this.templateDao.deleteByPrimaryKey(id);
	}

	@Override
	public List<Template> getAll() {
		// TODO Auto-generated method stub
		return this.templateDao.getAll();
	}

}
